<template>
    <div class="new-box">
        <orders
        v-for="it in orderInfoList"
        :key="it.id"
        :it="it"
        ></orders>
    </div>
</template>
<script lang="ts" setup>
import { Ref, ref } from 'vue';
import { getOrderListApi } from '../../apis/cartApis';
import { useCommonStore } from '../../store';
import Orders from './orders.vue'
const orderInfoList:Ref = ref([])
getOrderList()
async function getOrderList() {
    let _res = await getOrderListApi(useCommonStore().userInfo.id,'NEW')
    console.log(_res)
    if(_res.code === 200){
        orderInfoList.value = _res.data
    }
}
</script>
<style lang="less" scoped>
.new-box{
    width: 100vw;
    height: calc(100vh - 84px);
    overflow-x: hidden;
}
</style>